/*
	File: Tile.h
	Author: Nolan McGlynn( GearMonster1 )
	Class: SGP1 1303
	Purpose: To manage the very basic needs of a tile in the game
*/
#pragma once
class CSGD_TextureManager;
#include <Windows.h>
#define WIN32_LEAN_AND_MEAN

class CTile
{
	
public:

	enum TileType { TILE_GROUND,	TILE_FIRE, TILE_ICE, 
					TILE_TAR,		TILE_HEAL, TILE_GLASS, 
					TILE_BOTTOMLESS,TILE_WALL, TILE_DOOR };

	CTile(void);

	virtual void Render( void );

	~CTile(void);


	//Accessors and Mutators
	inline float GetTileWidth	( void )	{ return m_fTileWidth; }
	inline float GetTileHeight	( void )	{ return m_fTileHeight; }
	inline float GetWorldPosX	( void )	{ return m_fWorldPosX; }
	inline float GetWorldPosY	( void )	{ return m_fWorldPosY; }
	inline float GetImagePosX	( void )	{ return m_fImagePosX; }
	inline float GetImagePosY	( void )	{ return m_fImagePosY; }

	inline int GetImageID		( void )	{ return m_nImageID; }
	
	inline int GetTileType		( void )	{ return m_eTileType;}

	inline int GetItemType		( void )	{ return m_nHasItem; }

	RECT GetRect( void );

	inline void SetTileWidth	( float tileWidth )		{ m_fTileWidth	= tileWidth; }
	inline void SetTileHeight	( float tileHeight )	{ m_fTileHeight	= tileHeight; }
	inline void SetWorldPosX	( float tilePosX )		{ m_fWorldPosX	= tilePosX; }
	inline void SetWorldPosY	( float tilePosY )		{ m_fWorldPosY	= tilePosY;	}
	inline void SetImagePosX	( float imgPosX )		{ m_fImagePosX	= imgPosX;	}
	inline void SetImagePosY	( float imgPosY )		{ m_fImagePosY	= imgPosY;	}

	inline void SetImageID		( int imgID	)			{ m_nImageID	= imgID;	}

	inline void SetTileType		( TileType tileType	)	{ m_eTileType	= tileType; }

	inline void SetItemType		( int HasItem )			{ m_nHasItem	= HasItem; }

protected:

	// Tiles specific Type
	TileType m_eTileType;

private:

	// Sizes of the tiles and their positions
	float m_fTileWidth;
	float m_fTileHeight;
	float m_fWorldPosX;
	float m_fWorldPosY;

	// Where the tile is in the image that they are loaded from
	float m_fImagePosX;
	float m_fImagePosY;

	// Will be used to define what kind of item the tile is holding on to
	int m_nHasItem;

	// Asset ID's for the tile
	int m_nImageID;

	CSGD_TextureManager* m_pTM;

};

